<template>
	<div style="width:500px; height:500px; margin:20px auto;">
		<qrcode-vue :value="url" :size="size" level="H"></qrcode-vue>
	</div>
</template>
<script>
import C from '@/common/common.js'
import QrcodeVue from 'qrcode.vue'

export default {
  name: 'erWeiMa',
  data () {
    return {
      url: '',
      size: 500
    }
  },
  methods: {
    async makeCode () {
      let data = await C.ajax('/shop/basis/getshopid')
      this.url = 'http://mgj.178mr.com/guest/index/index?id=' + data.shopid
    }
  },
  mounted: function () {
    this.makeCode()
  },
  components: {QrcodeVue}
}
</script>
